package simulation;

import java.util.Comparator;
/**
 * Author: Kyle Martin
 * Purpose: Compares event objects.  Used for Priority Queue class.
 * Version 1
 * Last modified: 11/15/11
 * Tested by: Ben Lee
 * Date tested: 11/21/11
 */
public class EventTimeComparator implements Comparator<Event>
{
    @Override
    public int compare(Event x, Event y)
    {
    	
        if (x.getEventTime() < y.getEventTime())
        {
            return -1;
        }
        if (x.getEventTime() > y.getEventTime())
        {
            return 1;
        }
        return 0;
    }
}
